<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE DeriveFunctor #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">--</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- | Command-line parser</span><span>
</span><span id="line-7"></span><span class="hs-comment">--</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- This is an abstract command-line parser used by DynFlags.</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- (c) The University of Glasgow 2005</span><span>
</span><span id="line-11"></span><span class="hs-comment">--</span><span>
</span><span id="line-12"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-13"></span><span>
</span><span id="line-14"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Driver.CmdLine</span><span>
</span><span id="line-15"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-16"></span><span>      </span><span class="annot"><a href="GHC.Driver.CmdLine.html#processArgs"><span class="hs-identifier">processArgs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#OptKind"><span class="hs-identifier">OptKind</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#GhcFlagMode"><span class="hs-identifier">GhcFlagMode</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>      </span><span class="annot"><a href="GHC.Driver.CmdLine.html#CmdLineP"><span class="hs-identifier">CmdLineP</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#getCmdLineState"><span class="hs-identifier">getCmdLineState</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#putCmdLineState"><span class="hs-identifier">putCmdLineState</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>      </span><span class="annot"><a href="GHC.Driver.CmdLine.html#Flag"><span class="hs-identifier">Flag</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#defFlag"><span class="hs-identifier">defFlag</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#defGhcFlag"><span class="hs-identifier">defGhcFlag</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#defGhciFlag"><span class="hs-identifier">defGhciFlag</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#defHiddenFlag"><span class="hs-identifier">defHiddenFlag</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>      </span><span class="annot"><a href="GHC.Driver.CmdLine.html#errorsToGhcException"><span class="hs-identifier">errorsToGhcException</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span>      </span><span class="annot"><a href="GHC.Driver.CmdLine.html#Err"><span class="hs-identifier">Err</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#Warn"><span class="hs-identifier">Warn</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#WarnReason"><span class="hs-identifier">WarnReason</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span>      </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier">EwM</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#runEwM"><span class="hs-identifier">runEwM</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#addErr"><span class="hs-identifier">addErr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#addWarn"><span class="hs-identifier">addWarn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#addFlagWarn"><span class="hs-identifier">addFlagWarn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#getArg"><span class="hs-identifier">getArg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#getCurLoc"><span class="hs-identifier">getCurLoc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#liftEwM"><span class="hs-identifier">liftEwM</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>      </span><span class="annot"><a href="GHC.Driver.CmdLine.html#deprecate"><span class="hs-identifier">deprecate</span></a></span><span>
</span><span id="line-25"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Panic.html"><span class="hs-identifier">GHC.Utils.Panic</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html"><span class="hs-identifier">GHC.Data.Bag</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Json.html"><span class="hs-identifier">GHC.Utils.Json</span></a></span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Function.html#"><span class="hs-identifier">Data.Function</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier">liftM</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#ap"><span class="hs-identifier">ap</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span class="hs-comment">--------------------------------------------------------</span><span>
</span><span id="line-44"></span><span class="hs-comment">--         The Flag and OptKind types</span><span>
</span><span id="line-45"></span><span class="hs-comment">--------------------------------------------------------</span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-keyword">data</span><span> </span><span id="Flag"><span class="annot"><a href="GHC.Driver.CmdLine.html#Flag"><span class="hs-identifier hs-var">Flag</span></a></span></span><span> </span><span id="local-6989586621680922386"><span class="annot"><a href="#local-6989586621680922386"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Flag"><span class="annot"><a href="GHC.Driver.CmdLine.html#Flag"><span class="hs-identifier hs-var">Flag</span></a></span></span><span>
</span><span id="line-48"></span><span>    </span><span class="hs-special">{</span><span>   </span><span id="flagName"><span class="annot"><span class="annottext">forall (m :: * -&gt; *). Flag m -&gt; String
</span><a href="GHC.Driver.CmdLine.html#flagName"><span class="hs-identifier hs-var hs-var">flagName</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span>     </span><span class="hs-comment">-- Flag, without the leading &quot;-&quot;</span><span>
</span><span id="line-49"></span><span>        </span><span id="flagOptKind"><span class="annot"><span class="annottext">forall (m :: * -&gt; *). Flag m -&gt; OptKind m
</span><a href="GHC.Driver.CmdLine.html#flagOptKind"><span class="hs-identifier hs-var hs-var">flagOptKind</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#OptKind"><span class="hs-identifier hs-type">OptKind</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922386"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span>  </span><span class="hs-comment">-- What to do if we see it</span><span>
</span><span id="line-50"></span><span>        </span><span id="flagGhcMode"><span class="annot"><span class="annottext">forall (m :: * -&gt; *). Flag m -&gt; GhcFlagMode
</span><a href="GHC.Driver.CmdLine.html#flagGhcMode"><span class="hs-identifier hs-var hs-var">flagGhcMode</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#GhcFlagMode"><span class="hs-identifier hs-type">GhcFlagMode</span></a></span><span>    </span><span class="hs-comment">-- Which modes this flag affects</span><span>
</span><span id="line-51"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span id="local-6989586621680922379"><span class="annot"><a href="GHC.Driver.CmdLine.html#defFlag"><span class="hs-identifier hs-type">defFlag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#OptKind"><span class="hs-identifier hs-type">OptKind</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922379"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922379"><span class="hs-identifier hs-type">m</span></a></span></span><span>
</span><span id="line-54"></span><span id="defFlag"><span class="annot"><span class="annottext">defFlag :: forall (m :: * -&gt; *). String -&gt; OptKind m -&gt; Flag m
</span><a href="GHC.Driver.CmdLine.html#defFlag"><span class="hs-identifier hs-var hs-var">defFlag</span></a></span></span><span> </span><span id="local-6989586621680922183"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922183"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680922182"><span class="annot"><span class="annottext">OptKind m
</span><a href="#local-6989586621680922182"><span class="hs-identifier hs-var">optKind</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; OptKind m -&gt; GhcFlagMode -&gt; Flag m
forall (m :: * -&gt; *). String -&gt; OptKind m -&gt; GhcFlagMode -&gt; Flag m
</span><a href="GHC.Driver.CmdLine.html#Flag"><span class="hs-identifier hs-var">Flag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922183"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">OptKind m
</span><a href="#local-6989586621680922182"><span class="hs-identifier hs-var">optKind</span></a></span><span> </span><span class="annot"><span class="annottext">GhcFlagMode
</span><a href="GHC.Driver.CmdLine.html#AllModes"><span class="hs-identifier hs-var">AllModes</span></a></span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span id="local-6989586621680922180"><span class="annot"><a href="GHC.Driver.CmdLine.html#defGhcFlag"><span class="hs-identifier hs-type">defGhcFlag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#OptKind"><span class="hs-identifier hs-type">OptKind</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922180"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922180"><span class="hs-identifier hs-type">m</span></a></span></span><span>
</span><span id="line-57"></span><span id="defGhcFlag"><span class="annot"><span class="annottext">defGhcFlag :: forall (m :: * -&gt; *). String -&gt; OptKind m -&gt; Flag m
</span><a href="GHC.Driver.CmdLine.html#defGhcFlag"><span class="hs-identifier hs-var hs-var">defGhcFlag</span></a></span></span><span> </span><span id="local-6989586621680922179"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922179"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680922178"><span class="annot"><span class="annottext">OptKind m
</span><a href="#local-6989586621680922178"><span class="hs-identifier hs-var">optKind</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; OptKind m -&gt; GhcFlagMode -&gt; Flag m
forall (m :: * -&gt; *). String -&gt; OptKind m -&gt; GhcFlagMode -&gt; Flag m
</span><a href="GHC.Driver.CmdLine.html#Flag"><span class="hs-identifier hs-var">Flag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922179"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">OptKind m
</span><a href="#local-6989586621680922178"><span class="hs-identifier hs-var">optKind</span></a></span><span> </span><span class="annot"><span class="annottext">GhcFlagMode
</span><a href="GHC.Driver.CmdLine.html#OnlyGhc"><span class="hs-identifier hs-var">OnlyGhc</span></a></span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span id="local-6989586621680922176"><span class="annot"><a href="GHC.Driver.CmdLine.html#defGhciFlag"><span class="hs-identifier hs-type">defGhciFlag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#OptKind"><span class="hs-identifier hs-type">OptKind</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922176"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922176"><span class="hs-identifier hs-type">m</span></a></span></span><span>
</span><span id="line-60"></span><span id="defGhciFlag"><span class="annot"><span class="annottext">defGhciFlag :: forall (m :: * -&gt; *). String -&gt; OptKind m -&gt; Flag m
</span><a href="GHC.Driver.CmdLine.html#defGhciFlag"><span class="hs-identifier hs-var hs-var">defGhciFlag</span></a></span></span><span> </span><span id="local-6989586621680922175"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922175"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680922174"><span class="annot"><span class="annottext">OptKind m
</span><a href="#local-6989586621680922174"><span class="hs-identifier hs-var">optKind</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; OptKind m -&gt; GhcFlagMode -&gt; Flag m
forall (m :: * -&gt; *). String -&gt; OptKind m -&gt; GhcFlagMode -&gt; Flag m
</span><a href="GHC.Driver.CmdLine.html#Flag"><span class="hs-identifier hs-var">Flag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922175"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">OptKind m
</span><a href="#local-6989586621680922174"><span class="hs-identifier hs-var">optKind</span></a></span><span> </span><span class="annot"><span class="annottext">GhcFlagMode
</span><a href="GHC.Driver.CmdLine.html#OnlyGhci"><span class="hs-identifier hs-var">OnlyGhci</span></a></span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span id="local-6989586621680922172"><span class="annot"><a href="GHC.Driver.CmdLine.html#defHiddenFlag"><span class="hs-identifier hs-type">defHiddenFlag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#OptKind"><span class="hs-identifier hs-type">OptKind</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922172"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922172"><span class="hs-identifier hs-type">m</span></a></span></span><span>
</span><span id="line-63"></span><span id="defHiddenFlag"><span class="annot"><span class="annottext">defHiddenFlag :: forall (m :: * -&gt; *). String -&gt; OptKind m -&gt; Flag m
</span><a href="GHC.Driver.CmdLine.html#defHiddenFlag"><span class="hs-identifier hs-var hs-var">defHiddenFlag</span></a></span></span><span> </span><span id="local-6989586621680922171"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922171"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680922170"><span class="annot"><span class="annottext">OptKind m
</span><a href="#local-6989586621680922170"><span class="hs-identifier hs-var">optKind</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; OptKind m -&gt; GhcFlagMode -&gt; Flag m
forall (m :: * -&gt; *). String -&gt; OptKind m -&gt; GhcFlagMode -&gt; Flag m
</span><a href="GHC.Driver.CmdLine.html#Flag"><span class="hs-identifier hs-var">Flag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922171"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">OptKind m
</span><a href="#local-6989586621680922170"><span class="hs-identifier hs-var">optKind</span></a></span><span> </span><span class="annot"><span class="annottext">GhcFlagMode
</span><a href="GHC.Driver.CmdLine.html#HiddenFlag"><span class="hs-identifier hs-var">HiddenFlag</span></a></span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span class="hs-comment">-- | GHC flag modes describing when a flag has an effect.</span><span>
</span><span id="line-66"></span><span class="hs-keyword">data</span><span> </span><span id="GhcFlagMode"><span class="annot"><a href="GHC.Driver.CmdLine.html#GhcFlagMode"><span class="hs-identifier hs-var">GhcFlagMode</span></a></span></span><span>
</span><span id="line-67"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span id="OnlyGhc"><span class="annot"><a href="GHC.Driver.CmdLine.html#OnlyGhc"><span class="hs-identifier hs-var">OnlyGhc</span></a></span></span><span>  </span><span class="hs-comment">-- ^ The flag only affects the non-interactive GHC</span><span>
</span><span id="line-68"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="OnlyGhci"><span class="annot"><a href="GHC.Driver.CmdLine.html#OnlyGhci"><span class="hs-identifier hs-var">OnlyGhci</span></a></span></span><span> </span><span class="hs-comment">-- ^ The flag only affects the interactive GHC</span><span>
</span><span id="line-69"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="AllModes"><span class="annot"><a href="GHC.Driver.CmdLine.html#AllModes"><span class="hs-identifier hs-var">AllModes</span></a></span></span><span> </span><span class="hs-comment">-- ^ The flag affects multiple ghc modes</span><span>
</span><span id="line-70"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="HiddenFlag"><span class="annot"><a href="GHC.Driver.CmdLine.html#HiddenFlag"><span class="hs-identifier hs-var">HiddenFlag</span></a></span></span><span> </span><span class="hs-comment">-- ^ This flag should not be seen in cli completion</span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span class="hs-keyword">data</span><span> </span><span id="OptKind"><span class="annot"><a href="GHC.Driver.CmdLine.html#OptKind"><span class="hs-identifier hs-var">OptKind</span></a></span></span><span> </span><span id="local-6989586621680922168"><span class="annot"><a href="#local-6989586621680922168"><span class="hs-identifier hs-type">m</span></a></span></span><span>                             </span><span class="hs-comment">-- Suppose the flag is -f</span><span>
</span><span id="line-73"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span id="NoArg"><span class="annot"><a href="GHC.Driver.CmdLine.html#NoArg"><span class="hs-identifier hs-var">NoArg</span></a></span></span><span>     </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922168"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>                 </span><span class="hs-comment">-- -f all by itself</span><span>
</span><span id="line-74"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="HasArg"><span class="annot"><a href="GHC.Driver.CmdLine.html#HasArg"><span class="hs-identifier hs-var">HasArg</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922168"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>       </span><span class="hs-comment">-- -farg or -f arg</span><span>
</span><span id="line-75"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="SepArg"><span class="annot"><a href="GHC.Driver.CmdLine.html#SepArg"><span class="hs-identifier hs-var">SepArg</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922168"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>       </span><span class="hs-comment">-- -f arg</span><span>
</span><span id="line-76"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="Prefix"><span class="annot"><a href="GHC.Driver.CmdLine.html#Prefix"><span class="hs-identifier hs-var">Prefix</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922168"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>       </span><span class="hs-comment">-- -farg</span><span>
</span><span id="line-77"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="OptPrefix"><span class="annot"><a href="GHC.Driver.CmdLine.html#OptPrefix"><span class="hs-identifier hs-var">OptPrefix</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922168"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>       </span><span class="hs-comment">-- -f or -farg (i.e. the arg is optional)</span><span>
</span><span id="line-78"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="OptIntSuffix"><span class="annot"><a href="GHC.Driver.CmdLine.html#OptIntSuffix"><span class="hs-identifier hs-var">OptIntSuffix</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922168"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- -f or -f=n; pass n to fn</span><span>
</span><span id="line-79"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="IntSuffix"><span class="annot"><a href="GHC.Driver.CmdLine.html#IntSuffix"><span class="hs-identifier hs-var">IntSuffix</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922168"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>          </span><span class="hs-comment">-- -f or -f=n; pass n to fn</span><span>
</span><span id="line-80"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="FloatSuffix"><span class="annot"><a href="GHC.Driver.CmdLine.html#FloatSuffix"><span class="hs-identifier hs-var">FloatSuffix</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Float</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922168"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>      </span><span class="hs-comment">-- -f or -f=n; pass n to fn</span><span>
</span><span id="line-81"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="PassFlag"><span class="annot"><a href="GHC.Driver.CmdLine.html#PassFlag"><span class="hs-identifier hs-var">PassFlag</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922168"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>       </span><span class="hs-comment">-- -f; pass &quot;-f&quot; fn</span><span>
</span><span id="line-82"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="AnySuffix"><span class="annot"><a href="GHC.Driver.CmdLine.html#AnySuffix"><span class="hs-identifier hs-var">AnySuffix</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922168"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>       </span><span class="hs-comment">-- -f or -farg; pass entire &quot;-farg&quot; to fn</span><span>
</span><span id="line-83"></span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="hs-comment">--------------------------------------------------------</span><span>
</span><span id="line-86"></span><span class="hs-comment">--         The EwM monad</span><span>
</span><span id="line-87"></span><span class="hs-comment">--------------------------------------------------------</span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span class="hs-comment">-- | Used when filtering warnings: if a reason is given</span><span>
</span><span id="line-90"></span><span class="hs-comment">-- it can be filtered out when displaying.</span><span>
</span><span id="line-91"></span><span class="hs-keyword">data</span><span> </span><span id="WarnReason"><span class="annot"><a href="GHC.Driver.CmdLine.html#WarnReason"><span class="hs-identifier hs-var">WarnReason</span></a></span></span><span>
</span><span id="line-92"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="NoReason"><span class="annot"><a href="GHC.Driver.CmdLine.html#NoReason"><span class="hs-identifier hs-var">NoReason</span></a></span></span><span>
</span><span id="line-93"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ReasonDeprecatedFlag"><span class="annot"><a href="GHC.Driver.CmdLine.html#ReasonDeprecatedFlag"><span class="hs-identifier hs-var">ReasonDeprecatedFlag</span></a></span></span><span>
</span><span id="line-94"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ReasonUnrecognisedFlag"><span class="annot"><a href="GHC.Driver.CmdLine.html#ReasonUnrecognisedFlag"><span class="hs-identifier hs-var">ReasonUnrecognisedFlag</span></a></span></span><span>
</span><span id="line-95"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680922151"><span id="local-6989586621680922153"><span class="annot"><span class="annottext">WarnReason -&gt; WarnReason -&gt; Bool
(WarnReason -&gt; WarnReason -&gt; Bool)
-&gt; (WarnReason -&gt; WarnReason -&gt; Bool) -&gt; Eq WarnReason
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: WarnReason -&gt; WarnReason -&gt; Bool
$c/= :: WarnReason -&gt; WarnReason -&gt; Bool
== :: WarnReason -&gt; WarnReason -&gt; Bool
$c== :: WarnReason -&gt; WarnReason -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680922144"><span id="local-6989586621680922146"><span id="local-6989586621680922148"><span class="annot"><span class="annottext">Int -&gt; WarnReason -&gt; ShowS
[WarnReason] -&gt; ShowS
WarnReason -&gt; String
(Int -&gt; WarnReason -&gt; ShowS)
-&gt; (WarnReason -&gt; String)
-&gt; ([WarnReason] -&gt; ShowS)
-&gt; Show WarnReason
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [WarnReason] -&gt; ShowS
$cshowList :: [WarnReason] -&gt; ShowS
show :: WarnReason -&gt; String
$cshow :: WarnReason -&gt; String
showsPrec :: Int -&gt; WarnReason -&gt; ShowS
$cshowsPrec :: Int -&gt; WarnReason -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-96"></span><span>
</span><span id="line-97"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680922140"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#WarnReason"><span class="hs-identifier hs-type">WarnReason</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-98"></span><span>  </span><span id="local-6989586621680922137"><span class="annot"><span class="annottext">ppr :: WarnReason -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; SDoc) -&gt; (WarnReason -&gt; String) -&gt; WarnReason -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">WarnReason -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Utils.Json.html#ToJson"><span class="hs-identifier hs-type">ToJson</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#WarnReason"><span class="hs-identifier hs-type">WarnReason</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-101"></span><span>  </span><span id="local-6989586621680922128"><span class="annot"><span class="annottext">json :: WarnReason -&gt; JsonDoc
</span><a href="GHC.Utils.Json.html#json"><span class="hs-identifier hs-var hs-var hs-var hs-var">json</span></a></span></span><span> </span><span class="annot"><span class="annottext">WarnReason
</span><a href="GHC.Driver.CmdLine.html#NoReason"><span class="hs-identifier hs-var">NoReason</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">JsonDoc
</span><a href="GHC.Utils.Json.html#JSNull"><span class="hs-identifier hs-var">JSNull</span></a></span><span>
</span><span id="line-102"></span><span>  </span><span class="annot"><a href="GHC.Utils.Json.html#json"><span class="hs-identifier hs-var">json</span></a></span><span> </span><span id="local-6989586621680922125"><span class="annot"><span class="annottext">WarnReason
</span><a href="#local-6989586621680922125"><span class="hs-identifier hs-var">reason</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; JsonDoc
</span><a href="GHC.Utils.Json.html#JSString"><span class="hs-identifier hs-var">JSString</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; JsonDoc) -&gt; String -&gt; JsonDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">WarnReason -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">WarnReason
</span><a href="#local-6989586621680922125"><span class="hs-identifier hs-var">reason</span></a></span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span class="hs-comment">-- | A command-line error message</span><span>
</span><span id="line-105"></span><span class="hs-keyword">newtype</span><span> </span><span id="Err"><span class="annot"><a href="GHC.Driver.CmdLine.html#Err"><span class="hs-identifier hs-var">Err</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="Err"><span class="annot"><a href="GHC.Driver.CmdLine.html#Err"><span class="hs-identifier hs-var">Err</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="errMsg"><span class="annot"><span class="annottext">Err -&gt; Located String
</span><a href="GHC.Driver.CmdLine.html#errMsg"><span class="hs-identifier hs-var hs-var">errMsg</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-106"></span><span>
</span><span id="line-107"></span><span class="hs-comment">-- | A command-line warning message and the reason it arose</span><span>
</span><span id="line-108"></span><span class="hs-keyword">data</span><span> </span><span id="Warn"><span class="annot"><a href="GHC.Driver.CmdLine.html#Warn"><span class="hs-identifier hs-var">Warn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Warn"><span class="annot"><a href="GHC.Driver.CmdLine.html#Warn"><span class="hs-identifier hs-var">Warn</span></a></span></span><span>
</span><span id="line-109"></span><span>  </span><span class="hs-special">{</span><span>   </span><span id="warnReason"><span class="annot"><span class="annottext">Warn -&gt; WarnReason
</span><a href="GHC.Driver.CmdLine.html#warnReason"><span class="hs-identifier hs-var hs-var">warnReason</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#WarnReason"><span class="hs-identifier hs-type">WarnReason</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-110"></span><span>      </span><span id="warnMsg"><span class="annot"><span class="annottext">Warn -&gt; Located String
</span><a href="GHC.Driver.CmdLine.html#warnMsg"><span class="hs-identifier hs-var hs-var">warnMsg</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-111"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="hs-keyword">type</span><span> </span><span id="Errs"><span class="annot"><a href="GHC.Driver.CmdLine.html#Errs"><span class="hs-identifier hs-var">Errs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#Err"><span class="hs-identifier hs-type">Err</span></a></span><span>
</span><span id="line-114"></span><span class="hs-keyword">type</span><span> </span><span id="Warns"><span class="annot"><a href="GHC.Driver.CmdLine.html#Warns"><span class="hs-identifier hs-var">Warns</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#Warn"><span class="hs-identifier hs-type">Warn</span></a></span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span class="hs-comment">-- EwM (&quot;errors and warnings monad&quot;) is a monad</span><span>
</span><span id="line-117"></span><span class="hs-comment">-- transformer for m that adds an (err, warn) state</span><span>
</span><span id="line-118"></span><span class="hs-keyword">newtype</span><span> </span><span id="EwM"><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-var">EwM</span></a></span></span><span> </span><span id="local-6989586621680922357"><span class="annot"><a href="#local-6989586621680922357"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span id="local-6989586621680922356"><span class="annot"><a href="#local-6989586621680922356"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="EwM"><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-var">EwM</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="unEwM"><span class="annot"><span class="annottext">forall (m :: * -&gt; *) a.
EwM m a -&gt; Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, a)
</span><a href="GHC.Driver.CmdLine.html#unEwM"><span class="hs-identifier hs-var hs-var">unEwM</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-comment">-- Current parse arg</span><span>
</span><span id="line-119"></span><span>                              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#Errs"><span class="hs-identifier hs-type">Errs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#Warns"><span class="hs-identifier hs-type">Warns</span></a></span><span>
</span><span id="line-120"></span><span>                              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680922357"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#Errs"><span class="hs-identifier hs-type">Errs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#Warns"><span class="hs-identifier hs-type">Warns</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680922356"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span id="local-6989586621680922346"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680922114"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922346"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922346"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-123"></span><span>    </span><span id="local-6989586621680922111"><span class="annot"><span class="annottext">fmap :: forall a b. (a -&gt; b) -&gt; EwM m a -&gt; EwM m b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var hs-var hs-var hs-var">fmap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; EwM m a -&gt; EwM m b
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span></span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span id="local-6989586621680922328"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680922101"><span id="local-6989586621680922103"><span id="local-6989586621680922105"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922328"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922328"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-126"></span><span>    </span><span id="local-6989586621680922098"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; EwM m a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621680922097"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680922097"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, a)) -&gt; EwM m a
forall (m :: * -&gt; *) a.
(Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, a)) -&gt; EwM m a
</span><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-var">EwM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">Located String
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680922096"><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922096"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621680922095"><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922095"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Errs, Warns, a) -&gt; m (Errs, Warns, a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922096"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922095"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680922097"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-127"></span><span>    </span><span id="local-6989586621680922093"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b. EwM m (a -&gt; b) -&gt; EwM m a -&gt; EwM m b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;*&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">EwM m (a -&gt; b) -&gt; EwM m a -&gt; EwM m b
forall (m :: * -&gt; *) a b. Monad m =&gt; m (a -&gt; b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#ap"><span class="hs-identifier hs-var">ap</span></a></span></span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span id="local-6989586621680922345"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680922086"><span id="local-6989586621680922088"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922345"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922345"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-130"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span id="local-6989586621680922083"><span class="annot"><span class="annottext">Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, a)
</span><a href="#local-6989586621680922083"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680922082"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b. EwM m a -&gt; (a -&gt; EwM m b) -&gt; EwM m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;&gt;=</span></a></span></span><span> </span><span id="local-6989586621680922081"><span class="annot"><span class="annottext">a -&gt; EwM m b
</span><a href="#local-6989586621680922081"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, b)) -&gt; EwM m b
forall (m :: * -&gt; *) a.
(Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, a)) -&gt; EwM m a
</span><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-var">EwM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680922080"><span class="annot"><span class="annottext">Located String
</span><a href="#local-6989586621680922080"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621680922079"><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922079"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621680922078"><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922078"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680922077"><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922077"><span class="hs-identifier hs-var">e'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680922076"><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922076"><span class="hs-identifier hs-var">w'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680922075"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680922075"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, a)
</span><a href="#local-6989586621680922083"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Located String
</span><a href="#local-6989586621680922080"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922079"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922078"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-131"></span><span>                                      </span><span class="annot"><span class="annottext">EwM m b -&gt; Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, b)
forall (m :: * -&gt; *) a.
EwM m a -&gt; Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, a)
</span><a href="GHC.Driver.CmdLine.html#unEwM"><span class="hs-identifier hs-var hs-var">unEwM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; EwM m b
</span><a href="#local-6989586621680922081"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680922075"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Located String
</span><a href="#local-6989586621680922080"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922077"><span class="hs-identifier hs-var">e'</span></a></span><span> </span><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922076"><span class="hs-identifier hs-var">w'</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span id="local-6989586621680922312"><span id="local-6989586621680922313"><span class="annot"><a href="GHC.Driver.CmdLine.html#runEwM"><span class="hs-identifier hs-type">runEwM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922313"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922312"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680922313"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#Errs"><span class="hs-identifier hs-type">Errs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#Warns"><span class="hs-identifier hs-type">Warns</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680922312"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-134"></span><span id="runEwM"><span class="annot"><span class="annottext">runEwM :: forall (m :: * -&gt; *) a. EwM m a -&gt; m (Errs, Warns, a)
</span><a href="GHC.Driver.CmdLine.html#runEwM"><span class="hs-identifier hs-var hs-var">runEwM</span></a></span></span><span> </span><span id="local-6989586621680922074"><span class="annot"><span class="annottext">EwM m a
</span><a href="#local-6989586621680922074"><span class="hs-identifier hs-var">action</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">EwM m a -&gt; Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, a)
forall (m :: * -&gt; *) a.
EwM m a -&gt; Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, a)
</span><a href="GHC.Driver.CmdLine.html#unEwM"><span class="hs-identifier hs-var hs-var">unEwM</span></a></span><span> </span><span class="annot"><span class="annottext">EwM m a
</span><a href="#local-6989586621680922074"><span class="hs-identifier hs-var">action</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Located String
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;processArgs: no arg yet&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Errs
forall a. Bag a
</span><a href="GHC.Data.Bag.html#emptyBag"><span class="hs-identifier hs-var">emptyBag</span></a></span><span> </span><span class="annot"><span class="annottext">Warns
forall a. Bag a
</span><a href="GHC.Data.Bag.html#emptyBag"><span class="hs-identifier hs-var">emptyBag</span></a></span><span>
</span><span id="line-135"></span><span>
</span><span id="line-136"></span><span id="local-6989586621680922306"><span class="annot"><a href="GHC.Driver.CmdLine.html#setArg"><span class="hs-identifier hs-type">setArg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922306"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922306"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-137"></span><span id="setArg"><span class="annot"><span class="annottext">setArg :: forall (m :: * -&gt; *). Located String -&gt; EwM m () -&gt; EwM m ()
</span><a href="GHC.Driver.CmdLine.html#setArg"><span class="hs-identifier hs-var hs-var">setArg</span></a></span></span><span> </span><span id="local-6989586621680922070"><span class="annot"><span class="annottext">Located String
</span><a href="#local-6989586621680922070"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span id="local-6989586621680922069"><span class="annot"><span class="annottext">Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, ())
</span><a href="#local-6989586621680922069"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, ()))
-&gt; EwM m ()
forall (m :: * -&gt; *) a.
(Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, a)) -&gt; EwM m a
</span><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-var">EwM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">Located String
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680922068"><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922068"><span class="hs-identifier hs-var">es</span></a></span></span><span> </span><span id="local-6989586621680922067"><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922067"><span class="hs-identifier hs-var">ws</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, ())
</span><a href="#local-6989586621680922069"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Located String
</span><a href="#local-6989586621680922070"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922068"><span class="hs-identifier hs-var">es</span></a></span><span> </span><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922067"><span class="hs-identifier hs-var">ws</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-138"></span><span>
</span><span id="line-139"></span><span id="local-6989586621680922304"><span class="annot"><a href="GHC.Driver.CmdLine.html#addErr"><span class="hs-identifier hs-type">addErr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922304"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922304"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-140"></span><span id="addErr"><span class="annot"><span class="annottext">addErr :: forall (m :: * -&gt; *). Monad m =&gt; String -&gt; EwM m ()
</span><a href="GHC.Driver.CmdLine.html#addErr"><span class="hs-identifier hs-var hs-var">addErr</span></a></span></span><span> </span><span id="local-6989586621680922064"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922064"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, ()))
-&gt; EwM m ()
forall (m :: * -&gt; *) a.
(Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, a)) -&gt; EwM m a
</span><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-var">EwM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621680922062"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680922062"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680922061"><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922061"><span class="hs-identifier hs-var">es</span></a></span></span><span> </span><span id="local-6989586621680922060"><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922060"><span class="hs-identifier hs-var">ws</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Errs, Warns, ()) -&gt; m (Errs, Warns, ())
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922061"><span class="hs-identifier hs-var">es</span></a></span><span> </span><span class="annot"><span class="annottext">Errs -&gt; Err -&gt; Errs
forall a. Bag a -&gt; a -&gt; Bag a
</span><a href="GHC.Data.Bag.html#snocBag"><span class="hs-operator hs-var">`snocBag`</span></a></span><span> </span><span class="annot"><span class="annottext">Located String -&gt; Err
</span><a href="GHC.Driver.CmdLine.html#Err"><span class="hs-identifier hs-var">Err</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; String -&gt; Located String
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680922062"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922064"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922060"><span class="hs-identifier hs-var">ws</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-141"></span><span>
</span><span id="line-142"></span><span id="local-6989586621680922058"><span class="annot"><a href="GHC.Driver.CmdLine.html#addWarn"><span class="hs-identifier hs-type">addWarn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922058"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922058"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-143"></span><span id="addWarn"><span class="annot"><span class="annottext">addWarn :: forall (m :: * -&gt; *). Monad m =&gt; String -&gt; EwM m ()
</span><a href="GHC.Driver.CmdLine.html#addWarn"><span class="hs-identifier hs-var hs-var">addWarn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WarnReason -&gt; String -&gt; EwM m ()
forall (m :: * -&gt; *). Monad m =&gt; WarnReason -&gt; String -&gt; EwM m ()
</span><a href="GHC.Driver.CmdLine.html#addFlagWarn"><span class="hs-identifier hs-var">addFlagWarn</span></a></span><span> </span><span class="annot"><span class="annottext">WarnReason
</span><a href="GHC.Driver.CmdLine.html#NoReason"><span class="hs-identifier hs-var">NoReason</span></a></span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span id="local-6989586621680922296"><span class="annot"><a href="GHC.Driver.CmdLine.html#addFlagWarn"><span class="hs-identifier hs-type">addFlagWarn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922296"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#WarnReason"><span class="hs-identifier hs-type">WarnReason</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922296"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-146"></span><span id="addFlagWarn"><span class="annot"><span class="annottext">addFlagWarn :: forall (m :: * -&gt; *). Monad m =&gt; WarnReason -&gt; String -&gt; EwM m ()
</span><a href="GHC.Driver.CmdLine.html#addFlagWarn"><span class="hs-identifier hs-var hs-var">addFlagWarn</span></a></span></span><span> </span><span id="local-6989586621680922053"><span class="annot"><span class="annottext">WarnReason
</span><a href="#local-6989586621680922053"><span class="hs-identifier hs-var">reason</span></a></span></span><span> </span><span id="local-6989586621680922052"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922052"><span class="hs-identifier hs-var">msg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, ()))
-&gt; EwM m ()
forall (m :: * -&gt; *) a.
(Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, a)) -&gt; EwM m a
</span><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-var">EwM</span></a></span><span> </span><span class="annot"><span class="annottext">((Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, ()))
 -&gt; EwM m ())
-&gt; (Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, ()))
-&gt; EwM m ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-147"></span><span>  </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621680922051"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680922051"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680922050"><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922050"><span class="hs-identifier hs-var">es</span></a></span></span><span> </span><span id="local-6989586621680922049"><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922049"><span class="hs-identifier hs-var">ws</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Errs, Warns, ()) -&gt; m (Errs, Warns, ())
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922050"><span class="hs-identifier hs-var">es</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922049"><span class="hs-identifier hs-var">ws</span></a></span><span> </span><span class="annot"><span class="annottext">Warns -&gt; Warn -&gt; Warns
forall a. Bag a -&gt; a -&gt; Bag a
</span><a href="GHC.Data.Bag.html#snocBag"><span class="hs-operator hs-var">`snocBag`</span></a></span><span> </span><span class="annot"><span class="annottext">WarnReason -&gt; Located String -&gt; Warn
</span><a href="GHC.Driver.CmdLine.html#Warn"><span class="hs-identifier hs-var">Warn</span></a></span><span> </span><span class="annot"><span class="annottext">WarnReason
</span><a href="#local-6989586621680922053"><span class="hs-identifier hs-var">reason</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; String -&gt; Located String
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680922051"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922052"><span class="hs-identifier hs-var">msg</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span id="local-6989586621680922048"><span class="annot"><a href="GHC.Driver.CmdLine.html#deprecate"><span class="hs-identifier hs-type">deprecate</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922048"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922048"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-150"></span><span id="deprecate"><span class="annot"><span class="annottext">deprecate :: forall (m :: * -&gt; *). Monad m =&gt; String -&gt; EwM m ()
</span><a href="GHC.Driver.CmdLine.html#deprecate"><span class="hs-identifier hs-var hs-var">deprecate</span></a></span></span><span> </span><span id="local-6989586621680922043"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922043"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-151"></span><span>    </span><span id="local-6989586621680922042"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922042"><span class="hs-identifier hs-var">arg</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">EwM m String
forall (m :: * -&gt; *). Monad m =&gt; EwM m String
</span><a href="GHC.Driver.CmdLine.html#getArg"><span class="hs-identifier hs-var">getArg</span></a></span><span>
</span><span id="line-152"></span><span>    </span><span class="annot"><span class="annottext">WarnReason -&gt; String -&gt; EwM m ()
forall (m :: * -&gt; *). Monad m =&gt; WarnReason -&gt; String -&gt; EwM m ()
</span><a href="GHC.Driver.CmdLine.html#addFlagWarn"><span class="hs-identifier hs-var">addFlagWarn</span></a></span><span> </span><span class="annot"><span class="annottext">WarnReason
</span><a href="GHC.Driver.CmdLine.html#ReasonDeprecatedFlag"><span class="hs-identifier hs-var">ReasonDeprecatedFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922042"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; is deprecated: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922043"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-153"></span><span>
</span><span id="line-154"></span><span id="local-6989586621680922293"><span class="annot"><a href="GHC.Driver.CmdLine.html#getArg"><span class="hs-identifier hs-type">getArg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922293"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922293"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span></span><span>
</span><span id="line-155"></span><span id="getArg"><span class="annot"><span class="annottext">getArg :: forall (m :: * -&gt; *). Monad m =&gt; EwM m String
</span><a href="GHC.Driver.CmdLine.html#getArg"><span class="hs-identifier hs-var hs-var">getArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, String))
-&gt; EwM m String
forall (m :: * -&gt; *) a.
(Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, a)) -&gt; EwM m a
</span><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-var">EwM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680922039"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922039"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680922038"><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922038"><span class="hs-identifier hs-var">es</span></a></span></span><span> </span><span id="local-6989586621680922037"><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922037"><span class="hs-identifier hs-var">ws</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Errs, Warns, String) -&gt; m (Errs, Warns, String)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922038"><span class="hs-identifier hs-var">es</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922037"><span class="hs-identifier hs-var">ws</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680922039"><span class="hs-identifier hs-var">arg</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span id="local-6989586621680922290"><span class="annot"><a href="GHC.Driver.CmdLine.html#getCurLoc"><span class="hs-identifier hs-type">getCurLoc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922290"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922290"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span></span><span>
</span><span id="line-158"></span><span id="getCurLoc"><span class="annot"><span class="annottext">getCurLoc :: forall (m :: * -&gt; *). Monad m =&gt; EwM m SrcSpan
</span><a href="GHC.Driver.CmdLine.html#getCurLoc"><span class="hs-identifier hs-var hs-var">getCurLoc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, SrcSpan))
-&gt; EwM m SrcSpan
forall (m :: * -&gt; *) a.
(Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, a)) -&gt; EwM m a
</span><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-var">EwM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621680922034"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680922034"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680922033"><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922033"><span class="hs-identifier hs-var">es</span></a></span></span><span> </span><span id="local-6989586621680922032"><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922032"><span class="hs-identifier hs-var">ws</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Errs, Warns, SrcSpan) -&gt; m (Errs, Warns, SrcSpan)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922033"><span class="hs-identifier hs-var">es</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922032"><span class="hs-identifier hs-var">ws</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680922034"><span class="hs-identifier hs-var">loc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span id="local-6989586621680922287"><span id="local-6989586621680922288"><span class="annot"><a href="GHC.Driver.CmdLine.html#liftEwM"><span class="hs-identifier hs-type">liftEwM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922288"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680922288"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922287"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922288"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922287"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-161"></span><span id="liftEwM"><span class="annot"><span class="annottext">liftEwM :: forall (m :: * -&gt; *) a. Monad m =&gt; m a -&gt; EwM m a
</span><a href="GHC.Driver.CmdLine.html#liftEwM"><span class="hs-identifier hs-var hs-var">liftEwM</span></a></span></span><span> </span><span id="local-6989586621680922028"><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621680922028"><span class="hs-identifier hs-var">action</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, a)) -&gt; EwM m a
forall (m :: * -&gt; *) a.
(Located String -&gt; Errs -&gt; Warns -&gt; m (Errs, Warns, a)) -&gt; EwM m a
</span><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-var">EwM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">Located String
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680922027"><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922027"><span class="hs-identifier hs-var">es</span></a></span></span><span> </span><span id="local-6989586621680922026"><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922026"><span class="hs-identifier hs-var">ws</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680922025"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680922025"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621680922028"><span class="hs-identifier hs-var">action</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(Errs, Warns, a) -&gt; m (Errs, Warns, a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680922027"><span class="hs-identifier hs-var">es</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680922026"><span class="hs-identifier hs-var">ws</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680922025"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-162"></span><span>
</span><span id="line-163"></span><span>
</span><span id="line-164"></span><span class="hs-comment">--------------------------------------------------------</span><span>
</span><span id="line-165"></span><span class="hs-comment">-- A state monad for use in the command-line parser</span><span>
</span><span id="line-166"></span><span class="hs-comment">--------------------------------------------------------</span><span>
</span><span id="line-167"></span><span>
</span><span id="line-168"></span><span class="hs-comment">-- (CmdLineP s) typically instantiates the 'm' in (EwM m) and (OptKind m)</span><span>
</span><span id="line-169"></span><span class="hs-keyword">newtype</span><span> </span><span id="CmdLineP"><span class="annot"><a href="GHC.Driver.CmdLine.html#CmdLineP"><span class="hs-identifier hs-var">CmdLineP</span></a></span></span><span> </span><span id="local-6989586621680922284"><span class="annot"><a href="#local-6989586621680922284"><span class="hs-identifier hs-type">s</span></a></span></span><span> </span><span id="local-6989586621680922283"><span class="annot"><a href="#local-6989586621680922283"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="CmdLineP"><span class="annot"><a href="GHC.Driver.CmdLine.html#CmdLineP"><span class="hs-identifier hs-var">CmdLineP</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="runCmdLine"><span class="annot"><span class="annottext">forall s a. CmdLineP s a -&gt; s -&gt; (a, s)
</span><a href="GHC.Driver.CmdLine.html#runCmdLine"><span class="hs-identifier hs-var hs-var">runCmdLine</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621680922284"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680922283"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680922284"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-170"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680922019"><span id="local-6989586621680922021"><span class="annot"><span class="annottext">(forall a b. (a -&gt; b) -&gt; CmdLineP s a -&gt; CmdLineP s b)
-&gt; (forall a b. a -&gt; CmdLineP s b -&gt; CmdLineP s a)
-&gt; Functor (CmdLineP s)
forall a b. a -&gt; CmdLineP s b -&gt; CmdLineP s a
forall a b. (a -&gt; b) -&gt; CmdLineP s a -&gt; CmdLineP s b
forall s a b. a -&gt; CmdLineP s b -&gt; CmdLineP s a
forall s a b. (a -&gt; b) -&gt; CmdLineP s a -&gt; CmdLineP s b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; CmdLineP s b -&gt; CmdLineP s a
$c&lt;$ :: forall s a b. a -&gt; CmdLineP s b -&gt; CmdLineP s a
fmap :: forall a b. (a -&gt; b) -&gt; CmdLineP s a -&gt; CmdLineP s b
$cfmap :: forall s a b. (a -&gt; b) -&gt; CmdLineP s a -&gt; CmdLineP s b
</span><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-171"></span><span>
</span><span id="line-172"></span><span id="local-6989586621680922279"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680922008"><span id="local-6989586621680922010"><span id="local-6989586621680922012"><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#CmdLineP"><span class="hs-identifier hs-type">CmdLineP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922279"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-173"></span><span>    </span><span id="local-6989586621680922007"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; CmdLineP s a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621680922006"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680922006"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(s -&gt; (a, s)) -&gt; CmdLineP s a
forall s a. (s -&gt; (a, s)) -&gt; CmdLineP s a
</span><a href="GHC.Driver.CmdLine.html#CmdLineP"><span class="hs-identifier hs-var">CmdLineP</span></a></span><span> </span><span class="annot"><span class="annottext">((s -&gt; (a, s)) -&gt; CmdLineP s a) -&gt; (s -&gt; (a, s)) -&gt; CmdLineP s a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680922005"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621680922005"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680922006"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621680922005"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-174"></span><span>    </span><span id="local-6989586621680922003"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b. CmdLineP s (a -&gt; b) -&gt; CmdLineP s a -&gt; CmdLineP s b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;*&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmdLineP s (a -&gt; b) -&gt; CmdLineP s a -&gt; CmdLineP s b
forall (m :: * -&gt; *) a b. Monad m =&gt; m (a -&gt; b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#ap"><span class="hs-identifier hs-var">ap</span></a></span></span><span>
</span><span id="line-175"></span><span>
</span><span id="line-176"></span><span id="local-6989586621680922277"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680921996"><span id="local-6989586621680921998"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#CmdLineP"><span class="hs-identifier hs-type">CmdLineP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922277"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-177"></span><span>    </span><span id="local-6989586621680921995"><span class="annot"><span class="annottext">CmdLineP s a
</span><a href="#local-6989586621680921995"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621680921994"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b. CmdLineP s a -&gt; (a -&gt; CmdLineP s b) -&gt; CmdLineP s b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;&gt;=</span></a></span></span><span> </span><span id="local-6989586621680921993"><span class="annot"><span class="annottext">a -&gt; CmdLineP s b
</span><a href="#local-6989586621680921993"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(s -&gt; (b, s)) -&gt; CmdLineP s b
forall s a. (s -&gt; (a, s)) -&gt; CmdLineP s a
</span><a href="GHC.Driver.CmdLine.html#CmdLineP"><span class="hs-identifier hs-var">CmdLineP</span></a></span><span> </span><span class="annot"><span class="annottext">((s -&gt; (b, s)) -&gt; CmdLineP s b) -&gt; (s -&gt; (b, s)) -&gt; CmdLineP s b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680921992"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621680921992"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-178"></span><span>                  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680921991"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680921991"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680921990"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621680921990"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmdLineP s a -&gt; s -&gt; (a, s)
forall s a. CmdLineP s a -&gt; s -&gt; (a, s)
</span><a href="GHC.Driver.CmdLine.html#runCmdLine"><span class="hs-identifier hs-var hs-var">runCmdLine</span></a></span><span> </span><span class="annot"><span class="annottext">CmdLineP s a
</span><a href="#local-6989586621680921995"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621680921992"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-179"></span><span>                  </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">CmdLineP s b -&gt; s -&gt; (b, s)
forall s a. CmdLineP s a -&gt; s -&gt; (a, s)
</span><a href="GHC.Driver.CmdLine.html#runCmdLine"><span class="hs-identifier hs-var hs-var">runCmdLine</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; CmdLineP s b
</span><a href="#local-6989586621680921993"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680921991"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621680921990"><span class="hs-identifier hs-var">s'</span></a></span></span><span>
</span><span id="line-180"></span><span>
</span><span id="line-181"></span><span>
</span><span id="line-182"></span><span id="local-6989586621680922272"><span class="annot"><a href="GHC.Driver.CmdLine.html#getCmdLineState"><span class="hs-identifier hs-type">getCmdLineState</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#CmdLineP"><span class="hs-identifier hs-type">CmdLineP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922272"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922272"><span class="hs-identifier hs-type">s</span></a></span></span><span>
</span><span id="line-183"></span><span id="getCmdLineState"><span class="annot"><span class="annottext">getCmdLineState :: forall s. CmdLineP s s
</span><a href="GHC.Driver.CmdLine.html#getCmdLineState"><span class="hs-identifier hs-var hs-var">getCmdLineState</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(s -&gt; (s, s)) -&gt; CmdLineP s s
forall s a. (s -&gt; (a, s)) -&gt; CmdLineP s a
</span><a href="GHC.Driver.CmdLine.html#CmdLineP"><span class="hs-identifier hs-var">CmdLineP</span></a></span><span> </span><span class="annot"><span class="annottext">((s -&gt; (s, s)) -&gt; CmdLineP s s) -&gt; (s -&gt; (s, s)) -&gt; CmdLineP s s
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680921989"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621680921989"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621680921989"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621680921989"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-184"></span><span id="local-6989586621680922270"><span class="annot"><a href="GHC.Driver.CmdLine.html#putCmdLineState"><span class="hs-identifier hs-type">putCmdLineState</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621680922270"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#CmdLineP"><span class="hs-identifier hs-type">CmdLineP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922270"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-185"></span><span id="putCmdLineState"><span class="annot"><span class="annottext">putCmdLineState :: forall s. s -&gt; CmdLineP s ()
</span><a href="GHC.Driver.CmdLine.html#putCmdLineState"><span class="hs-identifier hs-var hs-var">putCmdLineState</span></a></span></span><span> </span><span id="local-6989586621680921988"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621680921988"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(s -&gt; ((), s)) -&gt; CmdLineP s ()
forall s a. (s -&gt; (a, s)) -&gt; CmdLineP s a
</span><a href="GHC.Driver.CmdLine.html#CmdLineP"><span class="hs-identifier hs-var">CmdLineP</span></a></span><span> </span><span class="annot"><span class="annottext">((s -&gt; ((), s)) -&gt; CmdLineP s ())
-&gt; (s -&gt; ((), s)) -&gt; CmdLineP s ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">s
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621680921988"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-186"></span><span>
</span><span id="line-187"></span><span>
</span><span id="line-188"></span><span class="hs-comment">--------------------------------------------------------</span><span>
</span><span id="line-189"></span><span class="hs-comment">--         Processing arguments</span><span>
</span><span id="line-190"></span><span class="hs-comment">--------------------------------------------------------</span><span>
</span><span id="line-191"></span><span>
</span><span id="line-192"></span><span id="local-6989586621680922268"><span class="annot"><a href="GHC.Driver.CmdLine.html#processArgs"><span class="hs-identifier hs-type">processArgs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922268"><span class="hs-identifier hs-type">m</span></a></span><span>
</span><span id="line-193"></span><span>            </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.CmdLine.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922268"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">]</span><span>               </span><span class="hs-comment">-- cmdline parser spec</span><span>
</span><span id="line-194"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>       </span><span class="hs-comment">-- args</span><span>
</span><span id="line-195"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680922268"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>  </span><span class="hs-comment">-- spare args</span><span>
</span><span id="line-196"></span><span>                   </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.CmdLine.html#Err"><span class="hs-identifier hs-type">Err</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>  </span><span class="hs-comment">-- errors</span><span>
</span><span id="line-197"></span><span>                   </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.CmdLine.html#Warn"><span class="hs-identifier hs-type">Warn</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">)</span></span><span> </span><span class="hs-comment">-- warnings</span><span>
</span><span id="line-198"></span><span id="processArgs"><span class="annot"><span class="annottext">processArgs :: forall (m :: * -&gt; *).
Monad m =&gt;
[Flag m] -&gt; [Located String] -&gt; m ([Located String], [Err], [Warn])
</span><a href="GHC.Driver.CmdLine.html#processArgs"><span class="hs-identifier hs-var hs-var">processArgs</span></a></span></span><span> </span><span id="local-6989586621680921984"><span class="annot"><span class="annottext">[Flag m]
</span><a href="#local-6989586621680921984"><span class="hs-identifier hs-var">spec</span></a></span></span><span> </span><span id="local-6989586621680921983"><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921983"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-199"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680921982"><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680921982"><span class="hs-identifier hs-var">errs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680921981"><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680921981"><span class="hs-identifier hs-var">warns</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680921980"><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921980"><span class="hs-identifier hs-var">spare</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">EwM m [Located String] -&gt; m (Errs, Warns, [Located String])
forall (m :: * -&gt; *) a. EwM m a -&gt; m (Errs, Warns, a)
</span><a href="GHC.Driver.CmdLine.html#runEwM"><span class="hs-identifier hs-var">runEwM</span></a></span><span> </span><span class="annot"><span class="annottext">EwM m [Located String]
</span><a href="#local-6989586621680921979"><span class="hs-identifier hs-var">action</span></a></span><span>
</span><span id="line-200"></span><span>    </span><span class="annot"><span class="annottext">([Located String], [Err], [Warn])
-&gt; m ([Located String], [Err], [Warn])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921980"><span class="hs-identifier hs-var">spare</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Errs -&gt; [Err]
forall a. Bag a -&gt; [a]
</span><a href="GHC.Data.Bag.html#bagToList"><span class="hs-identifier hs-var">bagToList</span></a></span><span> </span><span class="annot"><span class="annottext">Errs
</span><a href="#local-6989586621680921982"><span class="hs-identifier hs-var">errs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Warns -&gt; [Warn]
forall a. Bag a -&gt; [a]
</span><a href="GHC.Data.Bag.html#bagToList"><span class="hs-identifier hs-var">bagToList</span></a></span><span> </span><span class="annot"><span class="annottext">Warns
</span><a href="#local-6989586621680921981"><span class="hs-identifier hs-var">warns</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-201"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-202"></span><span>    </span><span id="local-6989586621680921979"><span class="annot"><span class="annottext">action :: EwM m [Located String]
</span><a href="#local-6989586621680921979"><span class="hs-identifier hs-var hs-var">action</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Located String] -&gt; [Located String] -&gt; EwM m [Located String]
</span><a href="#local-6989586621680921977"><span class="hs-identifier hs-var">process</span></a></span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921983"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-203"></span><span>
</span><span id="line-204"></span><span>    </span><span class="hs-comment">-- process :: [Located String] -&gt; [Located String] -&gt; EwM m [Located String]</span><span>
</span><span id="line-205"></span><span>    </span><span id="local-6989586621680921977"><span class="annot"><span class="annottext">process :: [Located String] -&gt; [Located String] -&gt; EwM m [Located String]
</span><a href="#local-6989586621680921977"><span class="hs-identifier hs-var hs-var">process</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621680921971"><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921971"><span class="hs-identifier hs-var">spare</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Located String] -&gt; EwM m [Located String]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Located String] -&gt; [Located String]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921971"><span class="hs-identifier hs-var">spare</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-206"></span><span>
</span><span id="line-207"></span><span>    </span><span class="annot"><a href="#local-6989586621680921977"><span class="hs-identifier hs-var">process</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680921969"><span class="annot"><span class="annottext">locArg :: Located String
</span><a href="#local-6989586621680921969"><span class="hs-identifier hs-var">locArg</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680921968"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921968"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680921967"><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921967"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680921966"><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921966"><span class="hs-identifier hs-var">spare</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-208"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Flag m] -&gt; String -&gt; Maybe (String, OptKind m)
forall (m :: * -&gt; *).
[Flag m] -&gt; String -&gt; Maybe (String, OptKind m)
</span><a href="GHC.Driver.CmdLine.html#findArg"><span class="hs-identifier hs-var">findArg</span></a></span><span> </span><span class="annot"><span class="annottext">[Flag m]
</span><a href="#local-6989586621680921984"><span class="hs-identifier hs-var">spec</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921968"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-209"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680921964"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921964"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680921963"><span class="annot"><span class="annottext">OptKind m
</span><a href="#local-6989586621680921963"><span class="hs-identifier hs-var">opt_kind</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-210"></span><span>                </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OptKind m
-&gt; String
-&gt; String
-&gt; [Located String]
-&gt; Either String (EwM m (), [Located String])
forall (m :: * -&gt; *).
OptKind m
-&gt; String
-&gt; String
-&gt; [Located String]
-&gt; Either String (EwM m (), [Located String])
</span><a href="GHC.Driver.CmdLine.html#processOneArg"><span class="hs-identifier hs-var">processOneArg</span></a></span><span> </span><span class="annot"><span class="annottext">OptKind m
</span><a href="#local-6989586621680921963"><span class="hs-identifier hs-var">opt_kind</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921964"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921968"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921967"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-211"></span><span>                    </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621680921961"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921961"><span class="hs-identifier hs-var">err</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-212"></span><span>                        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680921960"><span class="annot"><span class="annottext">b :: EwM m [Located String]
</span><a href="#local-6989586621680921960"><span class="hs-identifier hs-var hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Located String] -&gt; [Located String] -&gt; EwM m [Located String]
</span><a href="#local-6989586621680921977"><span class="hs-identifier hs-var">process</span></a></span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921967"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921966"><span class="hs-identifier hs-var">spare</span></a></span><span>
</span><span id="line-213"></span><span>                        </span><span class="hs-keyword">in</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located String -&gt; EwM m () -&gt; EwM m ()
forall (m :: * -&gt; *). Located String -&gt; EwM m () -&gt; EwM m ()
</span><a href="GHC.Driver.CmdLine.html#setArg"><span class="hs-identifier hs-var">setArg</span></a></span><span> </span><span class="annot"><span class="annottext">Located String
</span><a href="#local-6989586621680921969"><span class="hs-identifier hs-var">locArg</span></a></span><span> </span><span class="annot"><span class="annottext">(EwM m () -&gt; EwM m ()) -&gt; EwM m () -&gt; EwM m ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; EwM m ()
forall (m :: * -&gt; *). Monad m =&gt; String -&gt; EwM m ()
</span><a href="GHC.Driver.CmdLine.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921961"><span class="hs-identifier hs-var">err</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">EwM m () -&gt; EwM m [Located String] -&gt; EwM m [Located String]
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">EwM m [Located String]
</span><a href="#local-6989586621680921960"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-214"></span><span>
</span><span id="line-215"></span><span>                    </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680921959"><span class="annot"><span class="annottext">EwM m ()
</span><a href="#local-6989586621680921959"><span class="hs-identifier hs-var">action</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680921958"><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921958"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-216"></span><span>                        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680921957"><span class="annot"><span class="annottext">b :: EwM m [Located String]
</span><a href="#local-6989586621680921957"><span class="hs-identifier hs-var hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Located String] -&gt; [Located String] -&gt; EwM m [Located String]
</span><a href="#local-6989586621680921977"><span class="hs-identifier hs-var">process</span></a></span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921958"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921966"><span class="hs-identifier hs-var">spare</span></a></span><span>
</span><span id="line-217"></span><span>                        </span><span class="hs-keyword">in</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located String -&gt; EwM m () -&gt; EwM m ()
forall (m :: * -&gt; *). Located String -&gt; EwM m () -&gt; EwM m ()
</span><a href="GHC.Driver.CmdLine.html#setArg"><span class="hs-identifier hs-var">setArg</span></a></span><span> </span><span class="annot"><span class="annottext">Located String
</span><a href="#local-6989586621680921969"><span class="hs-identifier hs-var">locArg</span></a></span><span> </span><span class="annot"><span class="annottext">(EwM m () -&gt; EwM m ()) -&gt; EwM m () -&gt; EwM m ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">EwM m ()
</span><a href="#local-6989586621680921959"><span class="hs-identifier hs-var">action</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">EwM m () -&gt; EwM m [Located String] -&gt; EwM m [Located String]
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">EwM m [Located String]
</span><a href="#local-6989586621680921957"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-218"></span><span>
</span><span id="line-219"></span><span>            </span><span class="annot"><span class="annottext">Maybe (String, OptKind m)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Located String] -&gt; [Located String] -&gt; EwM m [Located String]
</span><a href="#local-6989586621680921977"><span class="hs-identifier hs-var">process</span></a></span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921967"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located String
</span><a href="#local-6989586621680921969"><span class="hs-identifier hs-var">locArg</span></a></span><span> </span><span class="annot"><span class="annottext">Located String -&gt; [Located String] -&gt; [Located String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921966"><span class="hs-identifier hs-var">spare</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-220"></span><span>
</span><span id="line-221"></span><span>    </span><span class="annot"><a href="#local-6989586621680921977"><span class="hs-identifier hs-var">process</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680921956"><span class="annot"><span class="annottext">Located String
</span><a href="#local-6989586621680921956"><span class="hs-identifier hs-var">arg</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680921955"><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921955"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680921954"><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921954"><span class="hs-identifier hs-var">spare</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Located String] -&gt; [Located String] -&gt; EwM m [Located String]
</span><a href="#local-6989586621680921977"><span class="hs-identifier hs-var">process</span></a></span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921955"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located String
</span><a href="#local-6989586621680921956"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="annot"><span class="annottext">Located String -&gt; [Located String] -&gt; [Located String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921954"><span class="hs-identifier hs-var">spare</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-222"></span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span id="local-6989586621680922262"><span class="annot"><a href="GHC.Driver.CmdLine.html#processOneArg"><span class="hs-identifier hs-type">processOneArg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#OptKind"><span class="hs-identifier hs-type">OptKind</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922262"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-225"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#EwM"><span class="hs-identifier hs-type">EwM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922262"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span><span>
</span><span id="line-226"></span><span id="processOneArg"><span class="annot"><span class="annottext">processOneArg :: forall (m :: * -&gt; *).
OptKind m
-&gt; String
-&gt; String
-&gt; [Located String]
-&gt; Either String (EwM m (), [Located String])
</span><a href="GHC.Driver.CmdLine.html#processOneArg"><span class="hs-identifier hs-var hs-var">processOneArg</span></a></span></span><span> </span><span id="local-6989586621680921950"><span class="annot"><span class="annottext">OptKind m
</span><a href="#local-6989586621680921950"><span class="hs-identifier hs-var">opt_kind</span></a></span></span><span> </span><span id="local-6989586621680921949"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921949"><span class="hs-identifier hs-var">rest</span></a></span></span><span> </span><span id="local-6989586621680921948"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921948"><span class="hs-identifier hs-var">arg</span></a></span></span><span> </span><span id="local-6989586621680921947"><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921947"><span class="hs-identifier hs-var">args</span></a></span></span><span>
</span><span id="line-227"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680921946"><span class="annot"><span class="annottext">dash_arg :: String
</span><a href="#local-6989586621680921946"><span class="hs-identifier hs-var hs-var">dash_arg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921948"><span class="hs-identifier hs-var">arg</span></a></span><span>
</span><span id="line-228"></span><span>        </span><span id="local-6989586621680921945"><span class="annot"><span class="annottext">rest_no_eq :: String
</span><a href="#local-6989586621680921945"><span class="hs-identifier hs-var hs-var">rest_no_eq</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="GHC.Driver.CmdLine.html#dropEq"><span class="hs-identifier hs-var">dropEq</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921949"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-229"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OptKind m
</span><a href="#local-6989586621680921950"><span class="hs-identifier hs-var">opt_kind</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-230"></span><span>        </span><span class="annot"><a href="GHC.Driver.CmdLine.html#NoArg"><span class="hs-identifier hs-type">NoArg</span></a></span><span>  </span><span id="local-6989586621680921943"><span class="annot"><span class="annottext">EwM m ()
</span><a href="#local-6989586621680921943"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span class="hs-identifier">null</span><span> </span><span class="hs-identifier">rest</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">Right</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">a</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">args</span><span class="hs-special">)</span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span>        </span><span class="annot"><a href="GHC.Driver.CmdLine.html#HasArg"><span class="hs-identifier hs-type">HasArg</span></a></span><span> </span><span id="local-6989586621680921937"><span class="annot"><span class="annottext">String -&gt; EwM m ()
</span><a href="#local-6989586621680921937"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. [a] -&gt; Bool
</span><a href="GHC.Utils.Misc.html#notNull"><span class="hs-identifier hs-var">notNull</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921945"><span class="hs-identifier hs-var">rest_no_eq</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(EwM m (), [Located String])
-&gt; Either String (EwM m (), [Located String])
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; EwM m ()
</span><a href="#local-6989586621680921937"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921945"><span class="hs-identifier hs-var">rest_no_eq</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921947"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-233"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921947"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-234"></span><span>                                    </span><span class="hs-special">[</span><span class="hs-special">]</span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Either String (EwM m (), [Located String])
forall a. String -&gt; Either String a
</span><a href="GHC.Driver.CmdLine.html#missingArgErr"><span class="hs-identifier hs-var">missingArgErr</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921946"><span class="hs-identifier hs-var">dash_arg</span></a></span><span>
</span><span id="line-235"></span><span>                                    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680921934"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921934"><span class="hs-identifier hs-var">arg1</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680921933"><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921933"><span class="hs-identifier hs-var">args1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(EwM m (), [Located String])
-&gt; Either String (EwM m (), [Located String])
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; EwM m ()
</span><a href="#local-6989586621680921937"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921934"><span class="hs-identifier hs-var">arg1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921933"><span class="hs-identifier hs-var">args1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-236"></span><span>
</span><span id="line-237"></span><span>        </span><span class="hs-comment">-- See #9776</span><span>
</span><span id="line-238"></span><span>        </span><span class="annot"><a href="GHC.Driver.CmdLine.html#SepArg"><span class="hs-identifier hs-type">SepArg</span></a></span><span> </span><span id="local-6989586621680921932"><span class="annot"><span class="annottext">String -&gt; EwM m ()
</span><a href="#local-6989586621680921932"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921947"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-239"></span><span>                        </span><span class="hs-special">[</span><span class="hs-special">]</span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Either String (EwM m (), [Located String])
forall a. String -&gt; Either String a
</span><a href="GHC.Driver.CmdLine.html#missingArgErr"><span class="hs-identifier hs-var">missingArgErr</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921946"><span class="hs-identifier hs-var">dash_arg</span></a></span><span>
</span><span id="line-240"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680921931"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921931"><span class="hs-identifier hs-var">arg1</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680921930"><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921930"><span class="hs-identifier hs-var">args1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(EwM m (), [Located String])
-&gt; Either String (EwM m (), [Located String])
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; EwM m ()
</span><a href="#local-6989586621680921932"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921931"><span class="hs-identifier hs-var">arg1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921930"><span class="hs-identifier hs-var">args1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-241"></span><span>
</span><span id="line-242"></span><span>        </span><span class="hs-comment">-- See #12625</span><span>
</span><span id="line-243"></span><span>        </span><span class="annot"><a href="GHC.Driver.CmdLine.html#Prefix"><span class="hs-identifier hs-type">Prefix</span></a></span><span> </span><span id="local-6989586621680921929"><span class="annot"><span class="annottext">String -&gt; EwM m ()
</span><a href="#local-6989586621680921929"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. [a] -&gt; Bool
</span><a href="GHC.Utils.Misc.html#notNull"><span class="hs-identifier hs-var">notNull</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921945"><span class="hs-identifier hs-var">rest_no_eq</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(EwM m (), [Located String])
-&gt; Either String (EwM m (), [Located String])
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; EwM m ()
</span><a href="#local-6989586621680921929"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921945"><span class="hs-identifier hs-var">rest_no_eq</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921947"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-244"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Either String (EwM m (), [Located String])
forall a. String -&gt; Either String a
</span><a href="GHC.Driver.CmdLine.html#missingArgErr"><span class="hs-identifier hs-var">missingArgErr</span></a></span><span>  </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921946"><span class="hs-identifier hs-var">dash_arg</span></a></span><span>
</span><span id="line-245"></span><span>
</span><span id="line-246"></span><span>        </span><span class="annot"><a href="GHC.Driver.CmdLine.html#PassFlag"><span class="hs-identifier hs-type">PassFlag</span></a></span><span> </span><span id="local-6989586621680921928"><span class="annot"><span class="annottext">String -&gt; EwM m ()
</span><a href="#local-6989586621680921928"><span class="hs-identifier hs-var">f</span></a></span></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. [a] -&gt; Bool
</span><a href="GHC.Utils.Misc.html#notNull"><span class="hs-identifier hs-var">notNull</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921949"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Either String (EwM m (), [Located String])
forall a. String -&gt; Either String a
</span><a href="GHC.Driver.CmdLine.html#unknownFlagErr"><span class="hs-identifier hs-var">unknownFlagErr</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921946"><span class="hs-identifier hs-var">dash_arg</span></a></span><span>
</span><span id="line-247"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(EwM m (), [Located String])
-&gt; Either String (EwM m (), [Located String])
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; EwM m ()
</span><a href="#local-6989586621680921928"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921946"><span class="hs-identifier hs-var">dash_arg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921947"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-248"></span><span>
</span><span id="line-249"></span><span>        </span><span class="annot"><a href="GHC.Driver.CmdLine.html#OptIntSuffix"><span class="hs-identifier hs-type">OptIntSuffix</span></a></span><span> </span><span id="local-6989586621680921926"><span class="annot"><span class="annottext">Maybe Int -&gt; EwM m ()
</span><a href="#local-6989586621680921926"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921949"><span class="hs-identifier hs-var">rest</span></a></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(EwM m (), [Located String])
-&gt; Either String (EwM m (), [Located String])
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Int -&gt; EwM m ()
</span><a href="#local-6989586621680921926"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921947"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-250"></span><span>                       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680921925"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680921925"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe Int
</span><a href="GHC.Driver.CmdLine.html#parseInt"><span class="hs-identifier hs-var">parseInt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921945"><span class="hs-identifier hs-var">rest_no_eq</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(EwM m (), [Located String])
-&gt; Either String (EwM m (), [Located String])
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Int -&gt; EwM m ()
</span><a href="#local-6989586621680921926"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680921925"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921947"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-251"></span><span>                       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Either String (EwM m (), [Located String])
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;malformed integer argument in &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921946"><span class="hs-identifier hs-var">dash_arg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-252"></span><span>
</span><span id="line-253"></span><span>        </span><span class="annot"><a href="GHC.Driver.CmdLine.html#IntSuffix"><span class="hs-identifier hs-type">IntSuffix</span></a></span><span> </span><span id="local-6989586621680921923"><span class="annot"><span class="annottext">Int -&gt; EwM m ()
</span><a href="#local-6989586621680921923"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680921922"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680921922"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe Int
</span><a href="GHC.Driver.CmdLine.html#parseInt"><span class="hs-identifier hs-var">parseInt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921945"><span class="hs-identifier hs-var">rest_no_eq</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(EwM m (), [Located String])
-&gt; Either String (EwM m (), [Located String])
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; EwM m ()
</span><a href="#local-6989586621680921923"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680921922"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921947"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-254"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Either String (EwM m (), [Located String])
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;malformed integer argument in &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921946"><span class="hs-identifier hs-var">dash_arg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-255"></span><span>
</span><span id="line-256"></span><span>        </span><span class="annot"><a href="GHC.Driver.CmdLine.html#FloatSuffix"><span class="hs-identifier hs-type">FloatSuffix</span></a></span><span> </span><span id="local-6989586621680921921"><span class="annot"><span class="annottext">Float -&gt; EwM m ()
</span><a href="#local-6989586621680921921"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680921920"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621680921920"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe Float
</span><a href="GHC.Driver.CmdLine.html#parseFloat"><span class="hs-identifier hs-var">parseFloat</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921945"><span class="hs-identifier hs-var">rest_no_eq</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(EwM m (), [Located String])
-&gt; Either String (EwM m (), [Located String])
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float -&gt; EwM m ()
</span><a href="#local-6989586621680921921"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621680921920"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921947"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-257"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Either String (EwM m (), [Located String])
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;malformed float argument in &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921946"><span class="hs-identifier hs-var">dash_arg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span>        </span><span class="annot"><a href="GHC.Driver.CmdLine.html#OptPrefix"><span class="hs-identifier hs-type">OptPrefix</span></a></span><span> </span><span id="local-6989586621680921918"><span class="annot"><span class="annottext">String -&gt; EwM m ()
</span><a href="#local-6989586621680921918"><span class="hs-identifier hs-var">f</span></a></span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(EwM m (), [Located String])
-&gt; Either String (EwM m (), [Located String])
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; EwM m ()
</span><a href="#local-6989586621680921918"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921945"><span class="hs-identifier hs-var">rest_no_eq</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921947"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-260"></span><span>        </span><span class="annot"><a href="GHC.Driver.CmdLine.html#AnySuffix"><span class="hs-identifier hs-type">AnySuffix</span></a></span><span> </span><span id="local-6989586621680921917"><span class="annot"><span class="annottext">String -&gt; EwM m ()
</span><a href="#local-6989586621680921917"><span class="hs-identifier hs-var">f</span></a></span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(EwM m (), [Located String])
-&gt; Either String (EwM m (), [Located String])
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; EwM m ()
</span><a href="#local-6989586621680921917"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921946"><span class="hs-identifier hs-var">dash_arg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Located String]
</span><a href="#local-6989586621680921947"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-261"></span><span>
</span><span id="line-262"></span><span id="local-6989586621680922263"><span class="annot"><a href="GHC.Driver.CmdLine.html#findArg"><span class="hs-identifier hs-type">findArg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.CmdLine.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922263"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#OptKind"><span class="hs-identifier hs-type">OptKind</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922263"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-263"></span><span id="findArg"><span class="annot"><span class="annottext">findArg :: forall (m :: * -&gt; *).
[Flag m] -&gt; String -&gt; Maybe (String, OptKind m)
</span><a href="GHC.Driver.CmdLine.html#findArg"><span class="hs-identifier hs-var hs-var">findArg</span></a></span></span><span> </span><span id="local-6989586621680921911"><span class="annot"><span class="annottext">[Flag m]
</span><a href="#local-6989586621680921911"><span class="hs-identifier hs-var">spec</span></a></span></span><span> </span><span id="local-6989586621680921910"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921910"><span class="hs-identifier hs-var">arg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-264"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">((String, OptKind m) -&gt; (String, OptKind m) -&gt; Ordering)
-&gt; [(String, OptKind m)] -&gt; [(String, OptKind m)]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Int -&gt; Ordering)
-&gt; ((String, OptKind m) -&gt; Int)
-&gt; (String, OptKind m)
-&gt; (String, OptKind m)
-&gt; Ordering
forall b c a. (b -&gt; b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; a -&gt; c
</span><a href="../../base/src/Data.Function.html#on"><span class="hs-operator hs-var">`on`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Int)
-&gt; ((String, OptKind m) -&gt; String) -&gt; (String, OptKind m) -&gt; Int
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(String, OptKind m) -&gt; String
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- prefer longest matching flag</span><span>
</span><span id="line-265"></span><span>           </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ShowS
</span><a href="GHC.Utils.Misc.html#removeSpaces"><span class="hs-identifier hs-var">removeSpaces</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921904"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">OptKind m
</span><a href="#local-6989586621680921903"><span class="hs-identifier hs-var">optKind</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-266"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621680921902"><span class="annot"><span class="annottext">Flag m
</span><a href="#local-6989586621680921902"><span class="hs-identifier hs-var">flag</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Flag m]
</span><a href="#local-6989586621680921911"><span class="hs-identifier hs-var">spec</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-267"></span><span>             </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680921903"><span class="annot"><span class="annottext">optKind :: OptKind m
</span><a href="#local-6989586621680921903"><span class="hs-identifier hs-var hs-var">optKind</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag m -&gt; OptKind m
forall (m :: * -&gt; *). Flag m -&gt; OptKind m
</span><a href="GHC.Driver.CmdLine.html#flagOptKind"><span class="hs-identifier hs-var hs-var">flagOptKind</span></a></span><span> </span><span class="annot"><span class="annottext">Flag m
</span><a href="#local-6989586621680921902"><span class="hs-identifier hs-var">flag</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-268"></span><span>             </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680921904"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921904"><span class="hs-identifier hs-var">rest</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; String -&gt; Maybe String
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Maybe [a]
</span><a href="../../base/src/Data.OldList.html#stripPrefix"><span class="hs-identifier hs-var">stripPrefix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Flag m -&gt; String
forall (m :: * -&gt; *). Flag m -&gt; String
</span><a href="GHC.Driver.CmdLine.html#flagName"><span class="hs-identifier hs-var hs-var">flagName</span></a></span><span> </span><span class="annot"><span class="annottext">Flag m
</span><a href="#local-6989586621680921902"><span class="hs-identifier hs-var">flag</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921910"><span class="hs-identifier hs-var">arg</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-269"></span><span>             </span><span class="annot"><span class="annottext">OptKind m -&gt; String -&gt; String -&gt; Bool
forall (t :: * -&gt; *). OptKind t -&gt; String -&gt; String -&gt; Bool
</span><a href="GHC.Driver.CmdLine.html#arg_ok"><span class="hs-identifier hs-var">arg_ok</span></a></span><span> </span><span class="annot"><span class="annottext">OptKind m
</span><a href="#local-6989586621680921903"><span class="hs-identifier hs-var">optKind</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921904"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921910"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-270"></span><span>    </span><span class="hs-keyword">of</span><span>
</span><span id="line-271"></span><span>        </span><span class="hs-special">[</span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (String, OptKind m)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-272"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621680921899"><span class="annot"><span class="annottext">(String, OptKind m)
</span><a href="#local-6989586621680921899"><span class="hs-identifier hs-var">one</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[(String, OptKind m)]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(String, OptKind m) -&gt; Maybe (String, OptKind m)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(String, OptKind m)
</span><a href="#local-6989586621680921899"><span class="hs-identifier hs-var">one</span></a></span><span>
</span><span id="line-273"></span><span>
</span><span id="line-274"></span><span id="local-6989586621680922243"><span class="annot"><a href="GHC.Driver.CmdLine.html#arg_ok"><span class="hs-identifier hs-type">arg_ok</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.CmdLine.html#OptKind"><span class="hs-identifier hs-type">OptKind</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922243"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-275"></span><span id="arg_ok"><span class="annot"><span class="annottext">arg_ok :: forall (t :: * -&gt; *). OptKind t -&gt; String -&gt; String -&gt; Bool
</span><a href="GHC.Driver.CmdLine.html#arg_ok"><span class="hs-identifier hs-var hs-var">arg_ok</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#NoArg"><span class="hs-identifier hs-type">NoArg</span></a></span><span>           </span><span class="annot"><span class="annottext">EwM t ()
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span id="local-6989586621680921895"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921895"><span class="hs-identifier hs-var">rest</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921895"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-276"></span><span class="annot"><a href="GHC.Driver.CmdLine.html#arg_ok"><span class="hs-identifier hs-var">arg_ok</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#HasArg"><span class="hs-identifier hs-type">HasArg</span></a></span><span>          </span><span class="annot"><span class="annottext">String -&gt; EwM t ()
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-277"></span><span class="annot"><a href="GHC.Driver.CmdLine.html#arg_ok"><span class="hs-identifier hs-var">arg_ok</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#SepArg"><span class="hs-identifier hs-type">SepArg</span></a></span><span>          </span><span class="annot"><span class="annottext">String -&gt; EwM t ()
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span id="local-6989586621680921894"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921894"><span class="hs-identifier hs-var">rest</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921894"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-278"></span><span class="annot"><a href="GHC.Driver.CmdLine.html#arg_ok"><span class="hs-identifier hs-var">arg_ok</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#Prefix"><span class="hs-identifier hs-type">Prefix</span></a></span><span>          </span><span class="annot"><span class="annottext">String -&gt; EwM t ()
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-comment">-- Missing argument checked for in processOneArg t</span><span>
</span><span id="line-279"></span><span>                                            </span><span class="hs-comment">-- to improve error message (#12625)</span><span>
</span><span id="line-280"></span><span class="annot"><a href="GHC.Driver.CmdLine.html#arg_ok"><span class="hs-identifier hs-var">arg_ok</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#OptIntSuffix"><span class="hs-identifier hs-type">OptIntSuffix</span></a></span><span>    </span><span class="annot"><span class="annottext">Maybe Int -&gt; EwM t ()
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-281"></span><span class="annot"><a href="GHC.Driver.CmdLine.html#arg_ok"><span class="hs-identifier hs-var">arg_ok</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#IntSuffix"><span class="hs-identifier hs-type">IntSuffix</span></a></span><span>       </span><span class="annot"><span class="annottext">Int -&gt; EwM t ()
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-282"></span><span class="annot"><a href="GHC.Driver.CmdLine.html#arg_ok"><span class="hs-identifier hs-var">arg_ok</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#FloatSuffix"><span class="hs-identifier hs-type">FloatSuffix</span></a></span><span>     </span><span class="annot"><span class="annottext">Float -&gt; EwM t ()
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-283"></span><span class="annot"><a href="GHC.Driver.CmdLine.html#arg_ok"><span class="hs-identifier hs-var">arg_ok</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#OptPrefix"><span class="hs-identifier hs-type">OptPrefix</span></a></span><span>       </span><span class="annot"><span class="annottext">String -&gt; EwM t ()
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-284"></span><span class="annot"><a href="GHC.Driver.CmdLine.html#arg_ok"><span class="hs-identifier hs-var">arg_ok</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#PassFlag"><span class="hs-identifier hs-type">PassFlag</span></a></span><span>        </span><span class="annot"><span class="annottext">String -&gt; EwM t ()
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span id="local-6989586621680921893"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921893"><span class="hs-identifier hs-var">rest</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921893"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-285"></span><span class="annot"><a href="GHC.Driver.CmdLine.html#arg_ok"><span class="hs-identifier hs-var">arg_ok</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.CmdLine.html#AnySuffix"><span class="hs-identifier hs-type">AnySuffix</span></a></span><span>       </span><span class="annot"><span class="annottext">String -&gt; EwM t ()
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-286"></span><span>
</span><span id="line-287"></span><span class="hs-comment">-- | Parse an Int</span><span>
</span><span id="line-288"></span><span class="hs-comment">--</span><span>
</span><span id="line-289"></span><span class="hs-comment">-- Looks for &quot;433&quot; or &quot;=342&quot;, with no trailing gubbins</span><span>
</span><span id="line-290"></span><span class="hs-comment">--   * n or =n      =&gt; Just n</span><span>
</span><span id="line-291"></span><span class="hs-comment">--   * gibberish    =&gt; Nothing</span><span>
</span><span id="line-292"></span><span class="annot"><a href="GHC.Driver.CmdLine.html#parseInt"><span class="hs-identifier hs-type">parseInt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-293"></span><span id="parseInt"><span class="annot"><span class="annottext">parseInt :: String -&gt; Maybe Int
</span><a href="GHC.Driver.CmdLine.html#parseInt"><span class="hs-identifier hs-var hs-var">parseInt</span></a></span></span><span> </span><span id="local-6989586621680921892"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921892"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ReadS Int
forall a. Read a =&gt; ReadS a
</span><a href="../../base/src/Text.Read.html#reads"><span class="hs-identifier hs-var">reads</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921892"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-294"></span><span>                 </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621680921890"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680921890"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[(Int, String)]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680921890"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-295"></span><span>                 </span><span class="annot"><span class="annottext">[(Int, String)]
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-296"></span><span>
</span><span id="line-297"></span><span class="annot"><a href="GHC.Driver.CmdLine.html#parseFloat"><span class="hs-identifier hs-type">parseFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Float</span></span><span>
</span><span id="line-298"></span><span id="parseFloat"><span class="annot"><span class="annottext">parseFloat :: String -&gt; Maybe Float
</span><a href="GHC.Driver.CmdLine.html#parseFloat"><span class="hs-identifier hs-var hs-var">parseFloat</span></a></span></span><span> </span><span id="local-6989586621680921889"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921889"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ReadS Float
forall a. Read a =&gt; ReadS a
</span><a href="../../base/src/Text.Read.html#reads"><span class="hs-identifier hs-var">reads</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921889"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-299"></span><span>                   </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621680921888"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621680921888"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[(Float, String)]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Float -&gt; Maybe Float
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621680921888"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-300"></span><span>                   </span><span class="annot"><span class="annottext">[(Float, String)]
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe Float
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-301"></span><span>
</span><span id="line-302"></span><span class="hs-comment">-- | Discards a leading equals sign</span><span>
</span><span id="line-303"></span><span class="annot"><a href="GHC.Driver.CmdLine.html#dropEq"><span class="hs-identifier hs-type">dropEq</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-304"></span><span id="dropEq"><span class="annot"><span class="annottext">dropEq :: ShowS
</span><a href="GHC.Driver.CmdLine.html#dropEq"><span class="hs-identifier hs-var hs-var">dropEq</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'='</span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680921887"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921887"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921887"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-305"></span><span class="annot"><a href="GHC.Driver.CmdLine.html#dropEq"><span class="hs-identifier hs-var">dropEq</span></a></span><span> </span><span id="local-6989586621680921886"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921886"><span class="hs-identifier hs-var">s</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921886"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-306"></span><span>
</span><span id="line-307"></span><span id="local-6989586621680921885"><span class="annot"><a href="GHC.Driver.CmdLine.html#unknownFlagErr"><span class="hs-identifier hs-type">unknownFlagErr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680921885"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-308"></span><span id="unknownFlagErr"><span class="annot"><span class="annottext">unknownFlagErr :: forall a. String -&gt; Either String a
</span><a href="GHC.Driver.CmdLine.html#unknownFlagErr"><span class="hs-identifier hs-var hs-var">unknownFlagErr</span></a></span></span><span> </span><span id="local-6989586621680921884"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921884"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Either String a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unrecognised flag: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921884"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-309"></span><span>
</span><span id="line-310"></span><span id="local-6989586621680922254"><span class="annot"><a href="GHC.Driver.CmdLine.html#missingArgErr"><span class="hs-identifier hs-type">missingArgErr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680922254"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-311"></span><span id="missingArgErr"><span class="annot"><span class="annottext">missingArgErr :: forall a. String -&gt; Either String a
</span><a href="GHC.Driver.CmdLine.html#missingArgErr"><span class="hs-identifier hs-var hs-var">missingArgErr</span></a></span></span><span> </span><span id="local-6989586621680921883"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921883"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Either String a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;missing argument for flag: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921883"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-312"></span><span>
</span><span id="line-313"></span><span class="hs-comment">--------------------------------------------------------</span><span>
</span><span id="line-314"></span><span class="hs-comment">-- Utils</span><span>
</span><span id="line-315"></span><span class="hs-comment">--------------------------------------------------------</span><span>
</span><span id="line-316"></span><span>
</span><span id="line-317"></span><span>
</span><span id="line-318"></span><span class="hs-comment">-- See Note [Handling errors when parsing flags]</span><span>
</span><span id="line-319"></span><span class="annot"><a href="GHC.Driver.CmdLine.html#errorsToGhcException"><span class="hs-identifier hs-type">errorsToGhcException</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span>    </span><span class="hs-comment">-- Location</span><span>
</span><span id="line-320"></span><span>                          </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>   </span><span class="hs-comment">-- Error</span><span>
</span><span id="line-321"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Panic.html#GhcException"><span class="hs-identifier hs-type">GhcException</span></a></span><span>
</span><span id="line-322"></span><span id="errorsToGhcException"><span class="annot"><span class="annottext">errorsToGhcException :: [(String, String)] -&gt; GhcException
</span><a href="GHC.Driver.CmdLine.html#errorsToGhcException"><span class="hs-identifier hs-var hs-var">errorsToGhcException</span></a></span></span><span> </span><span id="local-6989586621680921882"><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621680921882"><span class="hs-identifier hs-var">errs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-323"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; GhcException
</span><a href="GHC.Utils.Panic.html#UsageError"><span class="hs-identifier hs-var">UsageError</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; GhcException) -&gt; String -&gt; GhcException
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; String
forall a. [a] -&gt; [[a]] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intercalate"><span class="hs-identifier hs-var">intercalate</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\n&quot;</span></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; String) -&gt; [String] -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921879"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921878"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680921879"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921879"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680921878"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921878"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621680921882"><span class="hs-identifier hs-var">errs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-324"></span><span>
</span><span id="line-325"></span><span class="hs-comment">{- Note [Handling errors when parsing commandline flags]

Parsing of static and mode flags happens before any session is started, i.e.,
before the first call to 'GHC.withGhc'. Therefore, to report errors for
invalid usage of these two types of flags, we can not call any function that
needs DynFlags, as there are no DynFlags available yet (unsafeGlobalDynFlags
is not set either). So we always print &quot;on the commandline&quot; as the location,
which is true except for Api users, which is probably ok.

When reporting errors for invalid usage of dynamic flags we /can/ make use of
DynFlags, and we do so explicitly in DynFlags.parseDynamicFlagsFull.

Before, we called unsafeGlobalDynFlags when an invalid (combination of)
flag(s) was given on the commandline, resulting in panics (#9963).
-}</span><span>
</span><span id="line-340"></span></pre></body></html>